﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace DotBoxChess
{
    public class Class1
    {
        public static void Main()
        {
            //List<int> l = new List<int>();
            //l.AddRange(new int[] { 5, 2, 3 });
            //l.AddRange(new int[] { 5, 2, 3 });

            //List<int> l1 = l.Distinct().ToList();
            //l.Sort();
            //List<int> cp = l1.ToList();
            //cp.Remove(5);
            //List<int> l2 = l1;
            //l2.Remove(5);
            //int c = 0;
            Chesser2 c2 = new Chesser2();
            for (int i = 0; i < 60; i++)
            {
                Console.WriteLine("请输入对方下的边：");
                string txt = Console.ReadLine();
                string[] nums = txt.Split(' ');
                List<int> sides = new List<int>();
                foreach (string str in nums)
                {
                    sides.Add(Convert.ToInt16(str));
                }
                Console.WriteLine("我方下的边是：");
                if (c2.Put_y(sides.ToArray()) != 0)
                {
                    Console.WriteLine("无效边！请重新下！");
                    continue;
                }
                int[] my_sides = c2.Get_m();
                foreach (int side in my_sides)
                {
                    Console.Write(side.ToString() + " ");
                }
                Console.WriteLine("Next");
            }
        }
    }
}
